<?php

App::uses('AppModel', 'Model');

class TransactionBankDetail extends AppModel {

    public $name = 'TransactionBankDetail';
    
    public $belongsTo = array(
        'Transaction' => array(
            'className' => 'Transaction',
            'foreignKey' => 'transaction_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'BankBranch' => array(
            'className' => 'BankBranch',
            'foreignKey' => 'bank_branch_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'BankUser' => array(
            'className' => 'BankUser',
            'foreignKey' => 'teller_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

    public function save($data = null,$validate = true, $fieldList = array()) {
        $s = $this->sanitize($data);
        return parent::save($s);
    }
}